Most storage subsystems implement a write-in-place policy for placement of data associated with write requests that overwrites existing data. The new write data for a logical location in the storage subsystem is placed in the same physical location as the old data for that logical location.
A storage system uses one or more storage subsystems for its logical storage. If the storage system implements space-efficient point-in-time copies (e.g., snapshot images) for its logical storage, the write-in-place policy requires that old data be copied out of its physical location in the storage subsystem for use in snapshot images before the new data is written into the physical location.
Copying the old data out of the physical location before writing the new data into the physical location creates a latency problem. From the perspective of the client requesting that the new data be written, the client must wait for the copy-out operation and the write operation to complete. Since both of these operations involve interacting with a slow stable storage (e.g., a hard disk drive), this latency may be significant.
Storage systems that implement snapshots currently solve the latency problem by placing fast stable storage (e.g., battery-backed NVRAM) in the storage system managing the snapshot organization. Write requests received by the storage system are stored in the fast stable storage and an acknowledgement is sent to the client indicating completion of the write request. The storage system then performs a copy out operation for the snapshot data using read and write commands on the underlying storage subsystem(s). After the copy out operation is complete, the storage server sends the original write request to the appropriate storage subsystem. The storage server waits for the storage subsystem to complete each operation because the storage subsystem lacks fast stable storage to defer the operations and acknowledge them quickly.
FIG. 1A illustrates an existing solution for providing reduced-latency copy-on-write functionality. Client 181 transmits write requests to storage server 183. Copy-on-write logic 185 receives the write request from the client 181 and stores it in fast stable storage 187. Fast stable storage 187 is tightly coupled to the storage server and is generally closely coupled to the other hardware components of the storage server 183. Storage server 183 then sends an acknowledgement to client 181 indicating that the write request is complete, enabling client 181 to continue on to other tasks. Copy-on-write logic 185 performs a copy using read and write instructions to storage subsystem 189 and then waits while storage subsystem 189 performs the read and write instructions on slow stable storage 191. When the read and write instructions are complete, subsystem 189 transmits acknowledgements to storage server 183. Storage server 183 then transmits a write instruction to storage subsystem 189, causing subsystem 189 to write new data received from client 181 to the slow stable storage 189. While the write request is a low-latency operation for the client 181, it requires fast stable storage at the storage server level.